package com.qfedu.labsystem.aspect;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.stereotype.Component;

/**
 * @ClassName LogAspect
 * @Author ykx
 * @Date 2024/4/11 22:47
 * @Version 1.0
 */
@Component
@Aspect
@Slf4j
public class LogAspect {
    @Around("execution(* com.qfedu.labsystem.service.impl.*.*(..))")
    public Object around(ProceedingJoinPoint jp) throws Throwable {
        log.info("环绕增强前面处理");
        //调用原方法
        Object ob = jp.proceed();
        log.info("环绕增强后面处理");
        return ob;
    }
}
